package com.hzhr.iot.collect.constant;


import com.hzhr.iot.collect.util.StrUtil;

/**
 * 绑定状态
 * @author 48310
 *
 */
public enum SimTypeEnum {
	/**
	 * 贴片卡
	 */
	PATCH(51, "00"),
	/**
	 * 插拔卡
	 */
	PLUGIN(52, "01"),
	/**
	 * 其它
	 */
	OTHER(53, "02");
	
	private int id;
	private String idForMessage;
	private SimTypeEnum(int id, String idForMessage) {
		this.id = id;
		this.idForMessage = idForMessage;
	}
	
	public int getId() {
		return id;
	}
	public String getIdForMessage() {
		return idForMessage;
	}
	
	public static SimTypeEnum getEnumByIdForMessage(String idForMessage) {
		for (SimTypeEnum simType : SimTypeEnum.values()) {
			if (simType.getIdForMessage().equals(StrUtil.FillZeroForLeft(idForMessage, 2))) {
				return simType;
			}
		}
		return null;
	}
}
